package com.cy.jt.controller;

import com.cy.jt.pojo.Role;
import com.cy.jt.service.RoleService;
import com.cy.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: LiuXingYu
 * @date: 2021/8/11 15:21
 */
@RestController
@RequestMapping("/role")
@CrossOrigin
public class RoleController {

    @Autowired
    private RoleService roleService;

//    get('/role/getRoleList')
    @GetMapping("/getRoleList")
    public SysResult getRoleList(){
        List<Role> roleList = roleService.getRoleList();
        return SysResult.success(roleList);
    }


}
